-
Notifications
You must be signed in to change notification settings - Fork 805
Python: fix for logging setup #2371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes logging setup by moving the logging.basicConfig() call from module-level execution to a dedicated setup_logging() function, giving users explicit control over when logging is configured.
Key Changes:
- Introduced
setup_logging()function inagent_framework._loggingto encapsulate logging configuration - Updated the observability sample to demonstrate the new logging setup pattern
- Added documentation explaining the opinionated logging format and how to use
setup_logging()
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
python/packages/core/agent_framework/_logging.py |
Moved logging.basicConfig() from module level into a new setup_logging() function and exported it via __all__ |
python/samples/getting_started/observability/setup_observability_with_parameters.py |
Added import and call to setup_logging() to demonstrate the new logging configuration pattern |
python/samples/getting_started/observability/README.md |
Added documentation sections explaining the setup_logging() function and updated sample description to reference logging setup |
f642151 to
b32521b
Compare
Motivation and Context
Closes: #2242
Description
Contribution Checklist